const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: [
        path.join(__dirname, 'src/assets/styles/variables.less'),
        path.join(__dirname, 'src/assets/styles/mixins.less')
      ]
    }
  },
  // 这个是给webpack-dev-server开启可IP和域名访问权限。配置之后访问地址：http://www.corho.com:8080/#/
  chainWebpack: config => {
    config.devServer.historyApiFallback(true)
  },
  devServer: {
    allowedHosts: 'all'
  }
})
